<template>
  <div>
    <PersonDetail v-if="flag" />
    <CompanyDetails v-else />
  </div>
</template>

<script>
  import PersonDetail from './personDetails.vue'
  import CompanyDetails from './companyDetails.vue'
  export default {
    name: 'details',
    data () {
      return {
        flag: false,
      }
    },
    components: {
      PersonDetail,
      CompanyDetails,
    },
    created () {
      if (this.$route.query.type === '个人') {
        this.flag = true
      } else {
        this.flag = false
      }
    },
    mounted () { },
    methods: {},
    computed: {},
    watch: {},
  }
</script>

<style scoped></style>
